package com.commerce.networkframework.utlis;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class StreamToString {
    public String conStreamToString(InputStream inputStream) throws IOException {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
        StringBuffer stringBuffer = new StringBuffer();
        String line;
        while ((line =bufferedReader.readLine())!=null){
            stringBuffer.append(line+"\n");
        }
     return stringBuffer.toString();
    }
}
